/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 */

#ifndef __TSIN_UTIL_FILELOGGER_HPP__
#define __TSIN_UTIL_FILELOGGER_HPP__

#include <tsin/util/common.hpp>
#include <tsin/util/Logger.hpp>
#include <fstream>

namespace tsin {

        /**
         * @class FileLogger
         * @ingroup util
         * @brief A simple logger which outputs logs to a certain file.
         */
        class UTIL_DLLEXPORT FileLogger : public Logger
        {
        public:
                FileLogger();
                FileLogger(const char *path);

                ~FileLogger();

                Logger &operator<<(const int i);
                Logger &operator<<(const char *str);
                Logger &operator<<(const float d);

        private:
                std::ofstream fout;
        };

}

#endif /* __TSIN_UTIL_FILELOGGER_HPP__ */
